import service from '@/utils/request'

// @Tags DdmsSpecDrawing
// @Summary 创建DDMS规格图
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.DdmsSpecDrawing true "创建DDMS规格图"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"创建成功"}"
// @Router /ddmsSpecDrawing/createDdmsSpecDrawing [post]
export const createDdmsSpecDrawing = (data) => {
  return service({
    url: '/ddmsSpecDrawing/createDdmsSpecDrawing',
    method: 'post',
    data
  })
}

// @Tags DdmsSpecDrawing
// @Summary 删除DDMS规格图
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.DdmsSpecDrawing true "删除DDMS规格图"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /ddmsSpecDrawing/deleteDdmsSpecDrawing [delete]
export const deleteDdmsSpecDrawing = (params) => {
  return service({
    url: '/ddmsSpecDrawing/deleteDdmsSpecDrawing',
    method: 'delete',
    params
  })
}

// @Tags DdmsSpecDrawing
// @Summary 批量删除DDMS规格图
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body request.IdsReq true "批量删除DDMS规格图"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /ddmsSpecDrawing/deleteDdmsSpecDrawing [delete]
export const deleteDdmsSpecDrawingByIds = (params) => {
  return service({
    url: '/ddmsSpecDrawing/deleteDdmsSpecDrawingByIds',
    method: 'delete',
    params
  })
}

// @Tags DdmsSpecDrawing
// @Summary 更新DDMS规格图
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.DdmsSpecDrawing true "更新DDMS规格图"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"更新成功"}"
// @Router /ddmsSpecDrawing/updateDdmsSpecDrawing [put]
export const updateDdmsSpecDrawing = (data) => {
  return service({
    url: '/ddmsSpecDrawing/updateDdmsSpecDrawing',
    method: 'put',
    data
  })
}

// @Tags DdmsSpecDrawing
// @Summary 用id查询DDMS规格图
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data query model.DdmsSpecDrawing true "用id查询DDMS规格图"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"查询成功"}"
// @Router /ddmsSpecDrawing/findDdmsSpecDrawing [get]
export const findDdmsSpecDrawing = (params) => {
  return service({
    url: '/ddmsSpecDrawing/findDdmsSpecDrawing',
    method: 'get',
    params
  })
}

// @Tags DdmsSpecDrawing
// @Summary 分页获取DDMS规格图列表
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data query request.PageInfo true "分页获取DDMS规格图列表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /ddmsSpecDrawing/getDdmsSpecDrawingList [get]
export const getDdmsSpecDrawingList = (params) => {
  return service({
    url: '/ddmsSpecDrawing/getDdmsSpecDrawingList',
    method: 'get',
    params
  })
}
// 更新锁状态
export const updateDdmsSpecDrawingStatus = (data) => {
  return service({
    url: '/ddmsSpecDrawingList/updateDdmsSpecDrawingStatus',
    method: 'put',
    data
  })
}

// 审批
export const shenpi = (data) => {
  return service({
    url: '/ddmsSpecDrawing/updateDdmsSpecDrawingStatus',
    method: 'put',
    data
  })
}

// 升版
export const updateDdmsSpecDrawingVersion = (data) => {
  return service({
    url: '/ddmsSpecDrawing/updateDdmsSpecDrawingVersion',
    method: 'put',
    data
  })
}
// 规格图历史版本列表
export const getDdmsSpecDrawingHistoryList = (params) => {
  return service({
    url: '/ddmsSpecDrawing/getDdmsSpecDrawingHistoryList',
    method: 'get',
    params
  })
}
// 规格图历史版本详情
export const findDdmsSpecDrawingHistory = (params) => {
  return service({
    url: '/ddmsSpecDrawing/findDdmsSpecDrawingHistory',
    method: 'get',
    params
  })
}
// 退回
export const rollbackDdmsSpecDrawingVersion = (data) => {
  return service({
    url: '/ddmsSpecDrawing/rollbackDdmsSpecDrawingVersion',
    method: 'put',
    data
  })
}
